package com.wzh.loveEmail.controller;

import com.wzh.loveEmail.bean.WeatherInfo;
import com.wzh.loveEmail.form.R;
import com.wzh.loveEmail.service.ApiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * api测试
 *
 * @author qzz
 */
@RestController
@RequestMapping("/apiTest")
public class ApiTestController {

    @Autowired
    private ApiService apiService;


    /**
     * 彩虹屁
     */
    @GetMapping("/caihongpi")
    public R<String> caihongpi() {
        return R.ok(apiService.getCaiHongPiInfo());
    }

    /**
     * 舔狗日记
     */
    @GetMapping("/dogDiary")
    public R<String> dogDiary() {
        return R.ok(apiService.getDogDiary());
    }

    /**
     * 早安心语
     */
    @GetMapping("/zaoAnInfo")
    public R<String> zaoAnInfo() {
        return R.ok(apiService.getZaoAnInfo());
    }

    /**
     * 天气信息
     */
    @GetMapping("/weatherInfo")
    public R<WeatherInfo> weatherInfo() {
        return R.ok(apiService.getWeatherInfo("佛山"));
    }

    /**
     * 笑话
     */
    @GetMapping("/joke")
    public R<String> joke() {
        return R.ok(apiService.getJoke());
    }

    /**
     * 土味情话
     */
    @GetMapping("/sayLove")
    public R<String> sayLove() {
        return R.ok(apiService.getSayLove());
    }

}

